import math

max = 1000000000000
# max = 210
def qudiao0(n):
    while n % 10 == 0:
        n /= 10
    return n

def jiequ5(n):
    return n % 1000000

def jisuan():
    x = 10000000000
    max = 1000000000000
    x   = 9999999999
    while x <= max:
        print x, jiequ5(qudiao0(math.factorial(x)))
        x = x + 1
        
    print x,jiequ5(start)
            
# jisuan()
max = "1000000000000"
maXX =  long(max)
jiequ5(qudiao0(math.factorial(maXX)))

